<template>
  <div v-show="$store.state.design.shadeState === 2" class="savebox">
    <div class="savetitle">Name of design</div>
    <div class="closesave" @click="$store.commit('design/setShadeState',0)" />
    <input v-model="designName" type="text" placeholder="Enter text here" class="textipt" style="margin:70px auto;">
    <div class="addtextbtn" style="margin:0 auto;" @click="saveFirst">Add To Design</div>
  </div>
</template>
<script>
export default {
  components: {},
  data() {
    return {
      designName: ''
    };
  },
  created() {},
  mounted() {},
  methods: {
    saveFirst() {
      if (this.designName !== '') {
        this.$store.commit('design/setShadeState', 3);
        this.$store.commit('design/setTitle', this.designName);
      }
    }
  }
};
</script>
<style lang="scss" scoped>
.savebox{
  position: absolute;
  top:50%;
  left:50%;
  -webkit-transform: translate(-50%,-50%);
          transform: translate(-50%,-50%);
}
.savebox{
  width: 650px;
  height: 400px;
  background-color: #fff;
  text-align: center;
}
.closesave{
  position: absolute;
  top: 0;
  right: 0;
  width: 99px;
  height: 99px;
  cursor: pointer;
  background: url('/static/image/cl.png') no-repeat 42px 42px;
  z-index: 1;
}
.closesave:hover{
  background-image: url('/static/image/cl1.png');
}

.addtextbtn{
  width: 150px;
  text-align: center;
  height: 37px;
  line-height: 37px;
  color: #666;
  border: 1px solid #DBD9DA;
  cursor: pointer;
  margin: 0 20px 0 auto;
  font-weight: 600;
}
.addtextbtn:hover{
  color: #339;
  border-color: #339;
}
.textipt{
  display: block;
  width: 405px;
  height: 47px;
  margin: 0 auto 30px;
  text-align: center;
}

.savetitle{
  height: 99px;
  border-bottom: 1px solid #DBD9DA;
  text-align: center;
  font-size: 24px;
  line-height: 99px;
  font-weight: 700;
}
</style>

// WEBPACK FOOTER //
// src/components/save-box.vue
